//
//  Exrtension+userAcceCountModel.swift
//  上海微博
//
//  Created by zhangliming on 16/3/7.
//  Copyright © 2016年 zhangliming. All rights reserved.
//

import UIKit

extension userCountModel {


    func saveUserAcceCount () {

        let keys = ["uid", "screen_name", "access_token", "expires_in", "avatar_large","expireDate"]

        ///模型转字典

        let ZHWeiBoUserAcceCountKey = "ZHWeiBoUserAcceCountKey"

        var dict:[String:AnyObject] = dictionaryWithValuesForKeys(keys)

        for (k, v) in dict {

            if dict[k] == nil {

                dict[k] = 0
            }

            dict[k] = v
        }

        ///将个人信息保存到偏好设置

       // NSUserDefaults.standardUserDefaults().setObject(dict, forKey: ZHWeiBoUserAcceCountKey)

       // print("保存用户帐号\(NSHomeDirectory())")

       // print("\n------\(model)")

    }
}
